using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Configuration.Design;
using YB.EnterpriseLibrary.XSLTManager.Configuration.Design;

namespace YB.EnterpriseLibrary.XSLTManager.Configuration.Design
{
    class AddXSLTManagerSettingsNodeCommand : AddChildNodeCommand
    {
        public AddXSLTManagerSettingsNodeCommand(IServiceProvider serviceProvider)
			: base(serviceProvider, typeof(XSLTManagerSettingsNode))
		{

		}

        protected override void OnExecuted(EventArgs e)
        {
            base.OnExecuted(e);
            XSLTManagerSettingsNode node = ChildNode as XSLTManagerSettingsNode;

            XSLTManagerNode xsltManagerNode = new XSLTManagerNode();
            node.AddNode(xsltManagerNode);
            node.DefaultXSLTManager = xsltManagerNode;
        }
    }
}
